package org.bongo.open.cumulo.arbitrator.broker;

import org.bongo.open.cumulo.core.context.CumuloContext;
import org.bongo.open.cumulo.core.utils.PoolableObjectFactory;
import org.bongo.open.cumulo.procengine.broker.ProcEngineBroker;

public class ProcEngineBrokerFactory implements PoolableObjectFactory<ProcEngineBroker> {

	private CumuloContext context;
	
	public ProcEngineBrokerFactory(CumuloContext c) {
		context = c;
	}
	public ProcEngineBroker createObject() {
		ProcEngineBroker broker = new ProcEngineBroker();
		broker.initialize(context);
		
		return broker;
	}
	public void cleanup(ProcEngineBroker broker) {
		broker.shutdown(context);
		
	}

}
